package com.darsn.fowtle.core.repository;

import com.darsn.fowtle.core.domain.User;

public interface UserRepository {
	
	/***
	 * <p>
	 * Find the system user by the specifying <code>username</code> and <code>password</password>.
	 * </p>
	 * <p>
	 * The matching rule for <code>username</code> and <code>password</code> is strict.
	 * No further process will be acted on the parameters, those parameters will be directly
	 * transfer to match to the underlying data store. The matching is case sensitive and
	 * white spaces significant.
	 * </p>
	 * @param username The user id which was used by the user when he/her registered.
	 * @param password The password.
	 * @return If found, return the matching registered user. Otherwise, return null.
	 * @exception IllegalArgumentException If any of the parameter is null, or any of the parameter is a blank string.
	 */
	User findUser(String username, String password) throws IllegalArgumentException;
}
